﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Runtime.Serialization.Formatters.Binary;
using System.IO;
using System.Drawing;
using System.Web.Hosting;

namespace WcfDataService
{
    public partial class Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            EmployeeService service = new EmployeeService();
            EmployeeDetails details = service.GetEmployeeDetails(1);

            string employeeName = details.Name;

            string employeeImageFolder = System.Configuration.ConfigurationManager.AppSettings["EmployeeImageFolder"].ToString();
            string imgageUrl = details.PhotoUrl;

            string fullpath = employeeImageFolder + "/" + imgageUrl;

            uiEmployeeDiv.Controls.Add(new LiteralControl(
                "<img src='" + fullpath + "' />"
                ));


        }

    }
}